Go to Home Page
Questions?
Call 1-800-572-5517
 
  Go to Home Page  
  See all products
  See price schedules
  See manuals, tutorials, articles
  Download a free 30-day trial
  See user testimonials
  About Pacific Systems Group
 
 
SMF Tools
  See SMF Record Layouts
  See Sample SMF Reports
  Learn How to Export SMF Data
  Download Free SMF Reporting Software (30 days)
 
One of the greatest SMF record parsing programming languages I've ever seen. Chief, Large Systems Services Branch, NIH
  Choose Spectrum Writer to add 4GL to your product
  Report Writer Speedup Tips Article
Spectrum SMF Writer - the 4GL SMF Report Writer.

Add customized reports and PC export files to your product!

Table of Contents

NOTE: you can find this and other lessons in a
more complete and viewable format (including all Figures) in our Tutorial PDF.

Lesson 5. How to Make Your Own Report Titles

  1. This lesson teaches you how to specify your own report titles. The control statement discussed is:
  2. the TITLE statement
How to Use the TITLE Statement
  1. As we've seen in the previous lessons, a TITLE statement is not required to produce a report. If you do not supply a TITLE statement, Spectrum SMF Writer provides a default title.
  2. To specify your own report titles, simply use one or more TITLE statements. For each TITLE statement, Spectrum SMF Writer prints one title line at the top of each page of the report. The title lines print in the same order in which the TITLE statements occur.
  3. TITLE statements may appear anywhere after the INPUT statement.
  4. After the word TITLE and the colon, enclosed your desired title text in either single or double quotation marks. For example:

TITLE: 'SPECTRUM SMF WRITER REPORT - CPU TIMES'

  • If your title is too big to fit on a single line, type right up to column 72 in the first line and then continue in column 2 of the next line. Leave column 1 of the continuation line blank.
Adding the Date and Page Number to your Titles
  1. You can put more than one item on your TITLE statement. And you can also put the contents of fields in your titles.
  2. For example, you will probably want to include the date and page number in your titles. Do this by using the special built-in fields named #DATE and #PAGENUM . (Don't let the pound sign scare you. All of Spectrum SMF Writer's built-in field names begin with this character. This is to distinguish them from fields in your own files that may have similar names.) The contents of the special built-in fields #DATE and #PAGENUM are, of course, the system date and the current page number:

TITLE: #DATE / 'SPECTRUM SMF WRITER REPORT - CPU TIMES' / 'PAGE' #PAGENUM

  1. When using #DATE and #PAGENUM in your TITLE statement, do not enclose them in quotation marks. Anything enclosed in quotation marks is printed as is in the title. Anything not within quotation marks must be the name of a field, whose contents you want in the title.
Built-In Fields Available
  1. Here is a table showing the built-in fields available for use in TITLE statements:
    1. Built-In
      Field
    1. Description
    1. #DATE
    1. the system date in a true date field (which you can format any way you like. By default it is formatted as MM/DD/YY.)
    1. #DAYNAME
    1. a character field containing the current day of the week (e.g., " MONDAY ")
    1. #TIME
    1. the system time formatted as a 8-byte, 12-hour HH:MM AM/PM character field
    1. #TIME24
    1. the system time formatted as a 5-byte, 24-hour HH:MM character field
    1. #HHMMSS
    1. the system time in a true time field (which you can format any way you like.)
    1. #JOBNAME
    1. the name of the job executing Spectrum SMF Writer
Putting SMF File Data in the Title
  1. As mentioned earlier, TITLE statements consist of any mix of literal texts and field names. A field name can be one of Spectrum SMF Writer's built-in fields, as in the earlier example. Or it can be the name of a regular field from the SMF file (or even a COMPUTE field). When inserting the contents of a data field into the title, Spectrum SMF Writer uses the data found in the first record used on that report page. Figure _ shows an example of including file data in a title.
How to Align the Title
  1. Consider this TITLE statement again:

TITLE: #DATE / 'SPECTRUM SMF WRITER REPORT - CPU TIMES' / 'PAGE' #PAGENUM

  1. Notice that it contains two slashes (/). These are a powerful formatting device that let you easily align your titles in the customary way without having to carefully count up the number of columns in your report lines. (And then carefully counting them again when you make a minor change to the report.)
  2. When slashes are not used, the whole title is centered over the report.
  3. But when slashes are used, they divide the title line into three parts. The first part of the title ( #DATE , in the example above) will be aligned with the left margin of the report. The middle part (the literal text) will be centered over the report. And the last part (" PAGE " and #PAGENUM ) will be aligned with the right margin of the report.
  4. Figure _ shows a report that uses a TITLE statement similar to the one above.
  5. You can also use a single slash in your TITLE statement. That results in a 2-part title, where the first part is left-justified and the second part is right-justified.
  6. you can also use two slashes but leave one or more of the three title parts "empty". The report in Figure _ shows an example of doing this.
Summary
  1. Here is a summary of what we learned in this lesson:
  2. use the TITLE statement to specify your own titles for a report
  3. if more than one TITLE statement is used, the title lines print in the same order in which the TITLE statements appear
  4. use Spectrum SMF Writer's built-in fields to include the date, time, day of the week, and page number in your titles
  5. put a field name in the TITLE statement to show that field's current value in the title of each page
  6. use slashes to separate your title into left, center, and right aligned parts
  7. The next lesson will teach you how to customize the formatting of your report.
To Learn More
  1. You can also learn:
  2. how to print "footnotes" at the bottom of each page of the report
  3. the complete syntax for the TITLE statement, in .
Copyright 2024.
Pacific Systems Group.
All rights reserved.
Home | Products | Prices | Documentation | 30-Day Trials | Customer Reviews | Company | FAQ | Sample Reports | SMF Records
Send Your Comments or Questions